package com.example.system.service;


import co.elastic.clients.elasticsearch._types.Result;
import co.elastic.clients.elasticsearch.core.BulkResponse;
import co.elastic.clients.elasticsearch.core.IndexResponse;
import co.elastic.clients.elasticsearch.indices.GetIndexResponse;
import com.fasterxml.jackson.databind.node.ObjectNode;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;

/**
 * @Author 王鹤蒲
 * @Date 2023 12 25
 */
public interface EsService {

//    public boolean createIndex(String indexName);
//
//    public GetIndexResponse queryIndex(String indexName);
//
//    public Boolean isIndexExist(String indexName);
//
//    public Boolean deleteIndex(String indexName);
//
//    public <T>IndexResponse createByFluentDSL(String indexName, String indexId, T document);
//
//    public <T>IndexResponse createByBuilderPattern(String indexName, String indexId, T document);
//
//    public Boolean createByJson(String indexName,String indexId,String jsonContent);
//
//    public <T> void createAsync(String indexName, String indexId, T document, BiConsumer<IndexResponse,Throwable> action);
//
//    public <T> BulkResponse bulkCreate(String indexName, List<T> documents);
//
//    public <T> T getById(String indexName,String documentId,Class<T> tClass);
//
//    public <T> Result updateById(String indexName, String documentId, Class<T> tClass, Map<String,Object> map);
//
//    public ObjectNode getObjectNodeById(String indexName,String documentId);
//
//    public Boolean deleteById(String indexName,String documentId);
//
//    public BulkResponse bulkDeleteByIds(String indexName,List<String> documentIds);
}
